#include <iostream>

#include <vector>

#include <boost/assign/list_of.hpp>

#include "CompetenceClasseBase.h"
#include "CompetenceBasique.h"
#include "CompetencePourcent.h"
#include "CompetenceTiroir.h"
#include "CompetenceNivNbr.h"
#include "CompetenceNivPourcent.h"

using namespace std;
using namespace boost::assign;

int main( int argc, char* argv[] )
{
  vector< CompetenceClasseBase* > Conteneur;
  Conteneur.push_back( new CompetenceBasique( "Une compétence basique", 1) );
  Conteneur.push_back( new CompetenceBasique( "Une compétence basique avec alias", "Alias", 1 ) );
  Conteneur.push_back( new CompetencePourcent( "Avec un pourcentage", 5, 23 ) );
  Conteneur.push_back( new CompetenceTiroir( "Tiroir", 3, 1, 100, true ) );
  Conteneur.push_back( new CompetenceNivNbr( "Nbr dépendant niv", 4 ) );
  Conteneur.push_back( new CompetenceNivPourcent( "% dépendant niv", 6 ) );

  vector< CompetenceClasseBase* >::const_iterator it,
    debut( Conteneur.begin() ), fin( Conteneur.end() );

  for ( it = debut; it != fin; it++ )
    {
      cout << **it << endl;
    }

  while ( ! Conteneur.empty() )
    {
      delete Conteneur.back();
      Conteneur.pop_back();
    }
    
  return 0;
}
